package com.partner.frame;

import com.partner.frame.support.util.*;

public class BaseBean implements java.io.Serializable
{
   protected static final String DATE_FORMAT = "yyyy-MM-dd";
   protected static final String TIME_FORMAT = "HH:mm:ss";
   protected static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
   protected static final String DATE_HHMM_FORMAT = "yyyy-MM-dd HH:mm";
   protected static final String TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";

   public static String date2String(java.util.Date objDate, String dateFormat)
   {
      return DateConvertUtil.format(objDate, dateFormat);
   }

   public static <T extends java.util.Date> T string2Date(String dateString, String dateFormat, Class<T> targetType)
   {
      return DateConvertUtil.parse(dateString, dateFormat, targetType);
   }

}
